<?php


namespace App\Http\Controllers\Common;


use App\Services\FileService;
use Illuminate\Http\Request;

class FileController extends BaseController
{

    /**
     * @api {post} file/upload 04、文件上传
     * @apiName File-Upload
     * @apiGroup 99-Common
     * @apiVersion 1.0.0
     *
     * @apiParam {Array} files 资源数据集
     *
     * @apiSuccess {Number} code 成功返回标识为200，其他均为失败
     * @apiSuccess {String} message 响应结果描述
     *
     * @apiSuccess {Array} data 文件路径数据集
     *
     * @param Request $request
     * @param FileService $service
     * @return array
     * @throws \Exception
     */
    public function upload(Request $request, FileService $service) {
        return $service->upload($request);
    }
}
